// AWTGridBagConstraints.cpp: implementation of the AWTGridBagConstraints class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
//#include "AWTTest.h"
#include "AWTGridBagConstraints.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

IMPLEMENT_DYNAMIC(AWTGridBagConstraints, AWTObject)

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

AWTGridBagConstraints::AWTGridBagConstraints()
{
	m_gridx = GBRELATIVE;
	m_gridy = GBRELATIVE;
	m_gridwidth = 1;
	m_gridheight = 1;

	m_weightx = 0;
	m_weighty = 0;
	m_anchor = CENTER;
	m_fill = NONE;

	m_insets = new AWTInsets(0, 0, 0, 0);
	m_ipadx = 0;
	m_ipady = 0;
}

AWTGridBagConstraints::AWTGridBagConstraints(AWTGridBagConstraints &c)
{
	m_gridx = c.m_gridx;
	m_gridy = c.m_gridy;
	m_gridwidth = c.m_gridwidth;
	m_gridheight = c.m_gridheight;

	m_weightx = c.m_weightx;
	m_weighty = c.m_weighty;
	m_anchor = c.m_anchor;
	m_fill = c.m_fill;

	m_insets = new AWTInsets(*c.m_insets);
	m_ipadx = c.m_ipadx;
	m_ipady = c.m_ipady;
}

AWTGridBagConstraints::~AWTGridBagConstraints()
{
	if (m_insets != NULL)
		delete m_insets;
}
